Colin's Cornucopia

Welcome to my world of discovery

Boolean Algebra Primer

Return to Hobbies

Boolean Algebra is a special and simplified form of the mathematical theory of logic. It is used by electrical engineers to design logic circuits in control systems and computers and by computer programmers to lay out complicated decision trees.

It can be quite difficult to those who are not professional mathematicians but Boolean Algebra in this form is quite easy to use with a little attention to the basics.

George Boole first set out his ideas in The Mathematical Analysis of Logic in 1847 and it has been fundamental to the development of modern digital controls and computers.

Basics.

Boolean Algebra has only two numbers or symbols 1 and 0 which are generally taken to equate to true and false. They can often equate to the presence or absence of an activity and are often interpreted by the presence or absence of a electical voltage level. You can set your own definitions of exactly what they mean but there cannot be more than two.

Boolean algebra has only three operators. These are AND, OR and NOT.

AND is signified with a stop "." A.B means A AND B

Or is signified with a "+" A+B means A OR B

NOT is signified with a bar over the symbol or term.

The equal sign has the same meaning as in normal algebra and all terms can be manipulated using the conventional rules of algebra.

It is difficult to get a word processor to put a bar over a term so the remainder of this article will be produced on a different program and pasted into this article.

full adder textErrata. 14 Oct 2017. Due to a bug I have been unable to change, the above sheet has an error in the Sum equation. The bug is weird. The Second term of the Sum equation should have a bar over the N and not the C. I have deleted the file from the server in its entirety which the server acknowledges and reloaded it with a correct file but the old error persists. I have made other changes in this file that have registered. Utterly weird. I finally cured this fault by changing the name of the panel above which is a .jpg photo of the original calculations. I can only imagine that the server had stored a copy of that photo and kept retrieving it in preference to my revised version. When I changed the name I defeated it. Bah ! Humbug ! -and very dangerous. I even went ot the trouble of getting Filezilla to show hidden files in the server but with no result. At least it has kept my rusting mind active for a couple of days.

Back to business.

Now a little Boolean Algebra

full adder part1

full adder part2

full adder part3

full adder part4

This circuit is for one bit of a binary addition and receives the two bits to be added, A and B and any Carry there might be. Bit 0 will have its carry input set to 0. Carry out Co from Bit 1 will be taken as the Cin for bit 2 and so on. Thus a full register can be made by daisy chaining as many bits as desired. The register can be used for the M, D, A, and S mathematical functions and to campare numbers or simply hold them as a store. The register is the vital core of the computer. Most computers have around 20 registers.

In the early days registers typicaly had 12, or 16 bits. One of the first computer chips had 8 bits and was called the Z8. Early personal computers mainly had 16 bits. Later 32 bits became the norm and we are now well into conversion into 64 bit personal computers. It is at present hard to imagine 128 bit personal computers becoming the norm but such predictions in the past have been proved false in remarkably short order.

The relay circuit below will provide the same functions  .

full adder diagram

The inputs are A, B and Ci which come from the assigned bit of the numbers to be added and the carry from the next lowest bit in the chain. The Sum output goes to the register and the carry output goes to provide the carry input to the next highest bit in the chain. The Sum outputs go to the register to give an 8, 16, 32 or 64 bit number. The carry outputs simply go to the next highest bit. The carry input on the first bit is set to zero.

The world's first working computer was called Heath Robinson and was built at Bletchley Park around 1943 using relay circuits as described above. It was probably not very successful. It is hard to imagine it could operate at a frequency greater than around 100 c/s while personal computers currently operate at around 3,600,000,000,000 c/s.

Tommy Flowers from the GPO reaearch station at Dollis Hill built a real computer between 1943 and 1944. This was called Collossus and was based on valves (or tubes) which were extremely power hungry but worked at a sensible frequency. By the end of the war this, and other machines, enabled the allies to get Hitler's orders before his own generals did.

Later computers worked on transistors and solid state chips and the first microcontroler computer chip appeard around 1980. Early chips had around 1000 gates on them while current chips have around 1,000,000,000 gates. The Boolean Algebra is still the same.

Colin Walker 28th June 2016

note. There were syntax errors in this article which were addressed on

13 Oct 2017 and solved on 14 Oct 2017.

I believe all the equations and identities are now correct.

Return to Hobbies